import { isObject } from "./util";
import { proxyHandler } from "./handler";
export function createReactive (data) {
  return createReactiveData(data, proxyHandler);
}


function createReactiveData (data, proxyHandler) {
  if (!isObject(data)) {
    // 如果不是对象
    return data;
  }

  return new Proxy(data, proxyHandler)

}